<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .x{
            width: 200px;
            height: 200px;
            border: 1px solid black;
            font-size: 30px;
            text-align: center;
            line-height: 200px;
        }
    </style>
</head>
<body>
    <div class="box">hello</div>
</body>
</html>
<script>
    var box=document.getElementsByClassName('.box');
    box.ClassName='x';
</script>